home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-05-14 | 1.6 KB | 103 lines |
- import java.lang.Object;
-
- /*
- *
- * ButtonObject
- *
- */
- public class ButtonObject extends Object
- {
- private ButtonObject next;
- private ButtonObject subButton;
- private String text;
- private String ID;
- private String url;
- private boolean subButtonsExist;
-
- public ButtonObject()
- {
- this.next = null;
-
- // the default is one sub-button
-
- this.subButton = new ButtonObject(true);
- this.subButton.setNext(new ButtonObject(true));
- this.text = "";
- this.url = "";
- this.ID = "0";
- this.subButtonsExist = false;
- }
-
- // a kludge to avoid infinite recursion
-
- public ButtonObject(boolean foo)
- {
- this.next = null;
- this.subButton = null;
- this.text = "";
- this.url = "";
- this.ID = "0";
- }
-
- final public void setText(String text)
- {
- this.text = text;
- }
-
- final public void setID(String ID)
- {
- this.ID = ID;
- }
-
- final public String getID()
- {
- return this.ID;
- }
-
- final public String getText()
- {
- return this.text;
- }
-
- final public ButtonObject getNext()
- {
- return this.next;
- }
-
- final public void setNext(ButtonObject next)
- {
- this.next = next;
- }
-
- final public void setURL(String url)
- {
- this.url = url;
- }
-
- final public String getURL()
- {
- return this.url;
- }
-
- final public void setSubButtons(ButtonObject subButton)
- {
- this.subButton = subButton;
- }
-
- final public ButtonObject getSubButtons()
- {
- return this.subButton;
- }
-
- final public boolean getSubButtonsExist()
- {
- return this.subButtonsExist;
- }
-
- final public void setSubButtonsExist(boolean subButtonsExist)
- {
- this.subButtonsExist = subButtonsExist;
- }
- }
-
-